package com.at.partition7;

import org.apache.flink.api.common.functions.Partitioner;

/**
 * @author huangchao E-mail:fengquan8866@163.com
 * @version 创建时间：2024/9/25 16:34
 */
public class MyPartitioner3 implements Partitioner<String> {
    private static final long serialVersionUID = 5690899116450624086L;

    @Override
    public int partition(String key, int numPartitions) {
        return Integer.parseInt(key) % numPartitions;
    }
}
